import request from '@/utils/request';
import store from '@/store'

// 列表删除接口
export function deleteSerial(data) {
  return request({
    url: `/maintain/maintain/serialnumber/deleteSerialnumber/${data}`,
    method: 'delete'
  })
}

// 新增接口
export function addSerial(data) {
  const params = {
    ...data,
    createUserId: store.getters.userId,
    updateUserId: store.getters.userId
  }
  return request({
    url: '/maintain/maintain/serialnumber/addSerialnumber',
    method: 'put',
    data: params,
  })
}

// 编辑接口
export function editSerial(data) {
  const params = {
    ...data,
    updateUserId: store.getters.userId
  }
  return request({
    url: '/maintain/maintain/serialnumber/editSerialnumber',
    method: 'put',
    data: params
  })
}